<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../node_modules/vue/dist/vue.js"></script>
</head>

<body>
    <div id="app">
        <a v-bind:href="link">gogogo</a><br>

        <!-- class \ style -->
        <span
        :style="{color: color1,fontSize: size}" 
        :class="{active:isActive,'text-danger':hasError}">你好</span>

    </div>
    <script>
        new Vue({
            el: '#app',
            data: {
                link: "http://www.baidu.com",
                isActive: false,
                hasError: true,
                color1: 'red',
                size: '30px'


            }
        });
    </script>
</body>

</html>